import './assets/main.css'
import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css';
import { registerMicroApps, setDefaultMountApp, start } from 'qiankun';

registerMicroApps([
    {
        name: "vueApp",
        entry: "//localhost:8081", //要访问的ip
        container: "#sub-container",
        activeRule: "/app-vue", //访问的路由
        props: {
            // 传递给子应用的数据
            data: "hello vue app",
            prefix:'/app-vue'
        },
    },
    {
        name: "reactApp",
        entry: "//localhost:7788/subapp/sub-react",
        container: "#sub-container",
        activeRule: "/app-react",
    },
]);
// setDefaultMountApp('/VuePage')
//  启动 qiankun
// start();

const app = createApp(App)

app.use(createPinia())
app.use(router)
app.use(ElementPlus)

app.mount('#app')
